import { IConstant_Enum_Type_Imgd_Enum_TypeKey } from '@/common/constants/enum';
import { ApiProperty } from '@nestjs/swagger';
import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm';

@Entity()
export class Imgd {
  @PrimaryGeneratedColumn()
  id: number;

  @Column()
  @ApiProperty({ description: '图片路径' })
  imgUrl: string;

  @Column()
  @ApiProperty({ description: '分组键' })
  typeKey: IConstant_Enum_Type_Imgd_Enum_TypeKey;

  @Column({ default: 0 })
  @ApiProperty({ description: '排序', default: 0 })
  order: number;

  @Column({ nullable: true })
  @ApiProperty({ description: '链接' })
  linkUrl?: string;

  @Column({ nullable: true })
  @ApiProperty({ description: '描述' })
  describe?: string;
}
